<extend name="Base/common"/>
<block name="header">
    <include file="Public/_nav"/>
    <link type="text/css" rel="stylesheet" href="__CSS__/forum.css"/>
    <script type="text/javascript" src="__JS__/common.js"></script>
    <script type="text/javascript" src="__JS__/jquery.dotdotdot.js"></script>
</block>
<block name="body">
    <!-- 主体 -->
    <div id="body-container" class="container fmWrap">
        <div class="fmLeft">
            <!--论坛顶部广告位-->
            <div class="fmBox advTop">
                {:W('Common/Adv/render',array(array('name'=>'up_forum','type'=>1,'width'=>'780px','height'=>'200px','title'=>'论坛首页')))}
            </div>
            <!--论坛数据统计-->
            <div class="fmBox fmNum">
                <span>今日：<b>{$today_forum}</b></span>
                <span>昨日：<b>{$yesterday_forum}</b></span>
                <span>帖子：<b>{$count.all}</b></span>
                <span>会员：<b>{$all_member}</b></span>
                <span>欢迎新会员：<a href="{$new_member.space_url}">{$new_member.nickname|op_t}</a></span>
            </div>
            <!--全站帖子列表 每页8个帖子-->
            <ul class="invitation">
                <section id="contents">
                    <if condition="!$list">
                        <p class="fmBox noMore">{:L('_NOT_FOUND_')}</p>
                    </if>
                    <volist name="list" id="vo">
                        <include file="_list"/>
                    </volist>
                    <div class="fmBox fmPage">
                        {:getPagination($totalCount,modC('FORM_POST_SHOW_NUM_INDEX',8,'Forum'))}
                    </div>
                </section>
            </ul>
        </div>

        <div class="fmRight">
            <!--个人信息面板-->
            <div class="fmBox fmCard">
                <div class="rtAvt"><img src="{$user_log.avatar128}" alt="用户头像"></div>
                <p><a href="{$user_log.space_url}" ucard="{$user_log.uid}">{$user_log.nickname|op_t}</a></p>
                <div class="myNum">
                    <!--分别链接到我发过的帖子列表和我回复过的帖子列表-->
                    <a href="{:U('Forum/index/myForum',array('uid'=>$user_log['uid'],'type'=>'forum'))}" class="one">
                        <span>发帖</span>
                        <b>{$forum_count}</b>
                    </a>
                    <a href="{:U('Forum/index/myForum',array('uid'=>$user_log['uid'],'type'=>'reply'))}" class="one">
                        <span>回复</span>
                        <b>{$forum_comment_count}</b>
                    </a>
                </div>
            </div>
            <!--发帖按钮-->
            <div class="fmBox fmSend">
                <a class="sendBtn" href="{:U('forum/index/edit')}">发布新帖</a>
            </div>
            <!--推荐板块、版块导航-->
            <div class="fmBox fmPlate">
                <p class="fmTit">推荐板块</p>
                <div class="plate">
                    <volist name="forums_recommand" id="vo">
                        <a href="{:U('Index/forum',array('id'=>$vo['id']))}"> {$vo.title|text}</a>
                    </volist>
                </div>
                <a href="{:U('forum/index/lists')}" class="toAll">全部板块</a>
            </div>
            <!--推荐帖子-->
            <div class="fmBox hotList">
                <p class="fmTit">推荐帖子</p>
                <ul>
                    <php>for($i=1;$i<5;$i++){
                        $post=$suggestionPosts[$i];
                    </php>
                    <li><a class="text-more" href="{:U('detail',array('id'=>$post[id]))}">{$post.title|text}</a></li>
                    <php>}</php>
                </ul>
            </div>
            <!--活跃用户-->
            <div class="fmBox actUser hotList">
                <p class="fmTit">活跃用户</p>
                <div class="user">
                    <volist name="active_user" id="vo">
                        <div class="actWrap"><a href="{$vo.user.space_url}" ucard="{$vo.uid}"><img src="{$vo.user.avatar128}" alt="活跃用户头像"></a></div>
                    </volist>
                </div>
            </div>
            <!--右侧广告位-->
            <div class="fmBox advRight">
                {:W('Common/Adv/render',array(array('name'=>'right_bottom_forum','type'=>1,'width'=>'280px','height'=>'200px','title'=>'论坛右侧')))}
            </div>
        </div>
    </div>
</block>

